<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('后台权限组')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('group[]', $groupdata, $groupids, ['class'=>'form-control selectpicker', 'id' => 'c-group', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group c-type_id">
        <label class="control-label col-xs-12 col-sm-2">{:__('类别')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-type_id" data-rule="" data-source="department/type/selectpage" class="form-control selectpage" name="row[type_id]" type="text" value="{$row.type_id|htmlentities}" />
        </div>
    </div>
    <div class="form-group c-department_id">
        <label class="control-label col-xs-12 col-sm-2">{:__('部门')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-department_id" data-rule="" data-source="department/index/selectpage" class="form-control selectpage" name="row[department_id]" type="text" value="{$row.department_id|htmlentities}" />
        </div>
    </div>
    <div class="form-group c-position_id">
        <label class="control-label col-xs-12 col-sm-2">{:__('职务')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-position_id" data-rule="" data-source="department/position/selectpage" class="form-control selectpage" name="row[position_id]" type="text" value="{$row.position_id|htmlentities}" />
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label for="c-grouping_id" class="control-label col-xs-12 col-sm-2">{:__('组别')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-grouping_id" data-rule="" data-source="department/grouping/selectpage" class="form-control selectpage" name="row[grouping_id]" type="text" value="{$row.grouping_id|htmlentities}" data-pagination="true" data-page-size="10" data-multiple="true"/>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" name="row[username]" value="{$row.username|htmlentities}" data-rule="required;username" />
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label for="email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input type="email" class="form-control" id="email" name="row[email]" value="{$row.email|htmlentities}" data-rule="required;email" />-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label for="mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input type="text" class="form-control" id="mobile" name="row[mobile]" value="{$row.mobile|default=''|htmlentities}" data-rule="mobile" />-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="{$row.nickname|htmlentities}"/>
        </div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" autocomplete="new-password" value="" data-rule="password" />
        </div>
    </div>
    <div class="form-group">
        <label for="loginfailure" class="control-label col-xs-12 col-sm-2">{:__('Loginfailure')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="form-control" id="loginfailure" name="row[loginfailure]" value="{$row.loginfailure}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
